home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / standard / ldreadst.z / ldreadst
Encoding:
Text File  |  1998-10-30  |  3.1 KB  |  67 lines

  1.  
  2.  
  3.  
  4. LLLLDDDDRRRREEEEAAAADDDDSSSSTTTT((((3333XXXX))))                                                      LLLLDDDDRRRREEEEAAAADDDDSSSSTTTT((((3333XXXX))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ldreadst - read symbolt table information
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ffffiiiilllleeeehhhhddddrrrr....hhhh>>>>
  14.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyymmmmssss....hhhh>>>>
  15.      ####iiiinnnncccclllluuuuddddeeee <<<<llllddddffffccccnnnn....hhhh>>>>
  16.  
  17.      iiiinnnntttt llllddddrrrreeeeaaaaddddsssstttt((((LLLLDDDDFFFFIIIILLLLEEEE **** ldptr,  iiiinnnntttt flags ))));;;;
  18.  
  19. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  20.      _l_d_r_e_a_d_s_t reads in the portions of the symbol table implied by the _f_l_a_g_s
  21.      argument.  A _f_l_a_g_s argument of ----1111 reads in the entire symbol table.
  22.      Since the other symbol table routines, for example _l_d_t_b_r_e_a_d, ensure that
  23.      the relevant portions of the symbol table have been read in, you need not
  24.      call _l_d_r_e_a_d_s_t to use the other routines.  _l_d_r_e_a_d_s_t(_l_d_p_t_r,-_1) would simply
  25.      ensure the whole symbol table is read in at once, which is not necessary.
  26.  
  27.      _l_d_r_e_a_d_s_t is useful, however.  One can test for the existence of symbol
  28.      table information in a file in the following way:
  29.  
  30.                char *filename;
  31.                LDFILE *ldptr;
  32.                ldptr = ldopen(filename, (LDFILE *)0);
  33.                if(ldptr == NULL) {
  34.                  /* No such file exists */
  35.                } else {
  36.                  /* This is not the _only_ way one could test for
  37.                  ** the existence of the symbol table.
  38.                  */
  39.                  if(ldreadst(pchdr,-1) == FAILURE) {
  40.                     /* This binary has no symbol table */
  41.                  }
  42.                }
  43.  
  44.  
  45.      _l_d_r_e_a_d_s_t returns SSSSUUUUCCCCCCCCEEEESSSSSSSS if it has read in the symbol table successfully
  46.      or FFFFAAAAIIIILLLLUUUURRRREEEE if it cannot.  If an symbol table has been truncated or
  47.      damaged there is a small probability that _l_d_r_e_a_d_s_t will core dump rather
  48.      than return FFFFAAAAIIIILLLLUUUURRRREEEE ....
  49.  
  50.      The program must be loaded with the object file access routine library
  51.      lllliiiibbbbmmmmlllldddd....aaaa.
  52.  
  53. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  54.      ldopen(3S), ldclose(3X), ldfcn(4).
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.